package jiachunlei.observer.lesson1;

/**
 * 自定义观察者模式
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/12/6 22:29
 */
public class ObserverClient
{
    public static void main(String[] args)
    {
        Subject realSubject = new RealSubject();
        Observer observer = new RealObject();
        realSubject.attach(observer);
        realSubject.notifyChanged("监听的消息！");
    }
}
